//
//  UINavigationController_Category.m
//  LPTClient
//
//  Created by apple on 2018/12/7.
//  Copyright © 2018 zhaodd. All rights reserved.
//

#import "UINavigationController+Category.h"

@implementation UINavigationController (UINavigationController_Category)

+ (void)initialize {

//    // 获取导航条按钮的标识
    UIBarButtonItem *item = [UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[self class]]];
    // 修改返回按钮标题的位置 nav_icon_return
    [item setBackButtonTitlePositionAdjustment:UIOffsetMake(-1000, 0) forBarMetrics:UIBarMetricsDefault];
    
    
    UINavigationBar *bar = [UINavigationBar appearanceWhenContainedInInstancesOfClasses:@[[self class]]];
    //    // 设置导航条前景色
    [bar setTintColor:[UIColor colorWithRed:68/255.0 green:68/255.0 blue:68/255.0 alpha:1]];
    [bar setBackIndicatorImage:[UIImage imageNamed:@"nav_icon_return"]];
    [bar setBackIndicatorTransitionMaskImage:[UIImage imageNamed:@"nav_icon_return"]];
}

@end
